import request from '@/request/request'
//运输订单列表
export function getReceiptShipmentRecordsList(data) {
	return request({
		url: '/business/site/receiptShipmentRecords',
		method: 'get',
		data: data
	})
}

// 详情
export function receiptShipmentRecordsDetails(id) {
	return request({
		loading: true,
		url: `/business/site/receiptShipmentRecords/${id}`,
		method: 'get',
	})
}

// 新增 serviceType 收运 1  清掏2
export function addLn_receipt_shipment_order(data) {
  return request({
      url: '/business/receipt_shipment_order',
    method: 'post',
    data: data
  })
}
// 所有排放单位列表
export function user_sign_allList() {
    return request({
        url: '/business/site/getAssociatedEmissionUnit',
        method: 'get'
    })
}
// 根据选择的排放单位获取油品列表
export function user_oil_charge_standard(data) {
    return request({
        url: '/business/user_oil_charge_standard/allList1',
        method: 'get',
        data: data
    })
}
//查询所有种类列表 
export function category_allList(query) {
  return request({
    url: '/business/category_management/allList',
    method: 'get',
    data: query
  })
}
// 全部 油品列表
export function getOilList(query) {
  return request({
    url: '/business/oil_management/allList',
    method: 'get',
    data: query
  })
}


// 所有中转站列表
export function listAllTransfer_station(id) {
  return request({
    url: '/business/transfer_station/listAll',
    data: 'get'
  })
}
// 收运公司列表
export function listAllRecycling_company(id) {
    return request({
        url: '/business/recycling_company/listAll',
        method: 'get'
    })
}
// 司机列表 recyclingCompanyId 收运公司id   workType 所属工种 收运司机1  收运工 2
export function listAll_driver(data) {
    return request({
        url: '/business/driver/listAll',
        method: 'get',
        data: data
    })
}
// 车辆列表 车辆类型 vehicleType  recyclingCompanyId 收运公司id
export function listAll_receiving_vehicle(data) {
    return request({
        url: '/business/receiving_vehicle/listAll',
        method: 'get',
        data: data
    })
}

// 派单
export function dispatch(data) {
    return request({
        url: '/business/site/dispatch',
        method: 'post',
        data: data
    })
}

// 取消
export function cancelApplication(id) {
    return request({
        url: '/business/receipt_shipment_order/cancelApplication/' + id,
        method: 'post'
    })
}
// 查询全部设备列表 type 设备类型：0地磅、1电子秤、2行车记录仪、3执法记录仪
export function allListDevices(query) {
  return request({
    url: '/system/devices/allList',
    method: 'get',
    data: query
  })
}
// ----------------------------------
// 任务列表 /site/taskList
export function taskList(data) {
    return request({
        url: '/business/site/taskList',
        method: 'get',
        data: data
    })
}
export function getTaskDetail(data) {
    return request({
        url: '/business/site/taskDetail',
        method: 'get',
        data: data
    })
}
//获取司机任务数量
export function selectDriverTaskCount(data) {
  return request({
    url: '/business/collection_transportation_task/selectDriverTaskCount',
    method: 'get',
    data: data
  })
}

// 获取规划路线 /business/receipt_shipment_order/planRoute  post
export function planRoute(data) {
  return request({
    url: '/business/receipt_shipment_order/planRoute',
    method: 'post',
    data: data
  })
}
// 运输订单 获取规划路线 /business/receipt_shipment_order/planRoute  post
export function transportationPlanRoute(data) {
  return request({
    url: '/business/transportation_order/planRoute',
    method: 'post',
    data: data
  })
}
// 上传base64图片
export function uploadBase64(data) {
  return request({
    url: '/common/uploadBase64',
    method: 'post',
    data: data
  })
}

// 查询全部部门列表
export function deptListAll(query) {
  return request({
    url: '/system/dept/listAll',
    method: 'get',
    data: query
  })
}

// 任务取消
export function taskCancel(id) {
  return request({
    url: '/business/collection_transportation_task/cancel/' + id,
    method: 'post'
  })
}

//根据运输类型获取全部车辆类型
export function getVehicleType(type) {
  return request({
    url: '/business/receiving_vehicle/getVehicleType?transportationType=' + type,
    method: 'get',
  })
}